package com.jack.payment.entity.business;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Schema(name = "批量的公用写入数据")
public class BatchRecordBo<T> implements Serializable {
    @Schema(description = "现在时间戳")
    private Long currentTime;
    @Schema(description = "表名")
    private String daySuffix;
    @Schema(description = "单数据")
    private T data;
    @Schema(description = "list 多数据")
    private List<T> dataList;

    public BatchRecordBo(String daySuffix, List<T> dataList) {
        this.daySuffix = daySuffix;
        this.dataList = dataList;
    }

    public BatchRecordBo(Long currentTime, T data) {
        this.currentTime = currentTime;
        this.data = data;
    }

    public BatchRecordBo(List<T> dataList){
        this.dataList = dataList;
    }

    public BatchRecordBo(String daySuffix, T data) {
        this.daySuffix = daySuffix;
        this.data = data;
    }
    public BatchRecordBo(T data) {
        this.data = data;
    }
}
